package day0925;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Author:galaxy_yan
 * @Date: 2022/9/27
 * @Time: 18:58
 * @Description
 */
public  class Poker {
    private int rank;
    private String suit;

    private final String[] suits={"♠","❤","♣","*"};

    public Poker(String suit,int rank){
        this.suit=suit;
        this.rank=rank;
    }

    public Poker(){
    }

    public List<Poker> buyOne(){
        ArrayList<Poker> pokers=new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                pokers.add(new Poker(suits[i],j+1));
            }
        }
        return pokers;
    }

    public static void shuffle(List<Poker> pokers){
        if(pokers.size()!=52){
            throw new RuntimeException("");
        }
        Random random=new Random();

        for (int i = 0; i < pokers.size(); i++) {
            int index= random.nextInt(pokers.size());

        }
    }

}
